home *** CD-ROM | disk | FTP | other *** search
- /* p900.c --- bible */
- #include <conio.h>
- #include <stdlib.h>
- #define ESC '\033'
- main()
- {
- int xpos = 30, ypos, c = 0;
- cprintf("Press ESC to exit");
- while(c != ESC)
- {
- clrscr();
- gotoxy(1, 1);
- cprintf("Press ESC to exit");
- randomize();
- gotoxy(xpos, random(25) + 1);
- ypos = wherey();
- putch('Y');
- gotoxy(1, 12);
- cprintf("The 'Y' is at position %d", ypos);
- c = getch();
- }
- }